package com.wars2d.client;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.InputProcessor;
import com.badlogic.gdx.backends.jogl.JoglApplication;
import com.badlogic.gdx.backends.jogl.JoglApplicationConfiguration;
import com.badlogic.gdx.graphics.OrthographicCamera;
import com.badlogic.gdx.graphics.g2d.tiled.TileMapRenderer;

public class MainRenderer implements ApplicationListener {
	
	public static void main(String[] args) {
		JoglApplicationConfiguration config = new JoglApplicationConfiguration();
		config.width 	= Global.SCREEN_WIDTH;
		config.height	= Global.SCREEN_HEIGHT;
		config.fullscreen = true;
		config.title = "war2d";
		
		new JoglApplication(new MainRenderer(), config);
	}

	TileMapRenderer mRenderer;
	
	OrthographicCamera mCamera = null;
	
	GameStage mStage = null;
	
	@Override
	public void create() {
		mStage = new GameStage(Global.SCREEN_WIDTH, Global.SCREEN_HEIGHT, false);
	}

	@Override
	public void dispose() {
		
	}

	@Override
	public void pause() {
		
	}

	@Override
	public void render() {
		mStage.act(Gdx.graphics.getDeltaTime());
		mStage.draw();
	}

	@Override
	public void resize(int arg0, int arg1) {
		
	}

	@Override
	public void resume() {
		
	}

}
